<template>
  <div class="landlord">
    <DetailSection title="房东介绍" more="查看房东首页">
      <div class="intro">
        <div class="top">
          <img :src="landlordModule.topScroll" alt="" />
        </div>
        <div class="header">
          <div class="left">
            <div class="hotelLogo">
              <img :src="landlordModule.hotelLogo" alt="" />
            </div>
          </div>
          <div class="center">
            <div class="info">
              <div class="name">{{ landlordModule.hotelName }}</div>
              <div class="tags">
                <template v-for="(item, index) in landlordModule.hotelTags" :key="index">
                  <div class="item" :style="{ color: item.tagText.color }">
                    <span>{{ item.tagText.text }}</span>
                    <span class="divider" v-if="index !== landlordModule.hotelTags.length - 1"
                      >|</span
                    >
                  </div>
                </template>
              </div>
            </div>
          </div>

          <div class="right">
            <div class="contact">联系房东</div>
          </div>
        </div>

        <div class="bottom">
          <template v-for="(item, index) in landlordModule.hotelSummary" :key="index">
            <div class="item">
              <div class="title">{{ item.title }}</div>
              <div class="score">{{ item.introduction }}</div>
              <div class="desc title">{{ item.tip }}</div>
            </div>
          </template>
        </div>
      </div>
    </DetailSection>
  </div>
</template>

<script setup>
  import DetailSection from '@/components/detail-section/detail-section.vue'
  defineProps({
    landlordModule: {
      type: Object,
      default: () => ({})
    }
  })
</script>

<style lang="less" scoped>
  .landlord {
    .intro {
      .top {
        img {
          width: 100%;
          border-radius: 5%;
        }
      }

      .header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 10px;
        .left {
          .hotelLogo {
            img {
              border-radius: 50%;
              height: 54px;
              width: 54px;
              margin-right: 3px;
              
            }
          }
        }
      }
      .center {
        flex: 1;
        overflow-wrap: break-word;
        .info {
          .name {
            margin-top: 8px;
            font-size: 16px;
            font-weight: 600;
          }
          .tags {
            margin-top: 5px;
            display: flex;
            font-size: 12px;

            .divider {
              margin: 0 5px;
            }
          }
        }
      }

      .right {
        .contact {
          height: 24px;
          line-height: 24px;
          border-radius: 5px;
          padding: 0 10px;
          font-size: 12px;
          color: #fff;
          background-image: linear-gradient(90deg, #fa8c1d, #fcaf3f);
        }
      }
      .bottom {
        display: flex;
        justify-content: space-between;
        // margin: 10px 10px;
        margin: 40px 10px 10px;
        .title {
          color: #999;
          font-size: 12px;
        }
        .score {
          font-size: 19px;
          font-weight: 700;
          color: rgb(0, 0, 0);
          margin: 5px 0;
        }
      }
    }
  }
</style>
